<!--单个用户测试完成后 再次登录 显示单个用户的测试结果-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试结果</title>
    <script src="https://cdn.bootcss.com/jquery/1.12.3/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>


    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/layui.js"></script>
    <script>
        let uid = [[${uid}]]
        let tester = [[${tester}]]
        console.log(tester)
        let resultData;
        $.ajax({
            url:"result/selectResultByTesterId",
            method:"get",
            data:{testerId:uid},
            async:false,
            success(data){
                if (data.code === 0) {
                    resultData = data.data;
                }
            }
        });
        // $.ajax({
        //     url:"result/selectAllTesterResult",
        //     method:"POST",
        //     dataType:"JSON",
        //     data:JSON.stringify(tester),
        //     async:false,
        //     success(data){
        //         if (data.code === 0) {
        //             resultData = data.data;
        //         }
        //     }
        // });
    </script>
</head>
<body>
<h1>您的测试结果：</h1>
<h2 id="result"></h2>
</body>
<script>
    $("#result").html("红色："+resultData.red+"<br>"+
                    "蓝色："+resultData.blue+"<br>"+
                    "黄色："+resultData.yellow+"<br>"+
                    "绿色："+resultData.green+"<br>");
</script>
</html>